package com.btks.jswater.util;

import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;

/**
 * Created by admin on 2021/7/8.
 */
@Component
public class HttpClient {
    public String clinet(String url, HttpMethod method, MultiValueMap<String,String> param){
        RestTemplate template = new RestTemplate();
        ResponseEntity<String> response1 = template.getForEntity(url,String.class);
        return  response1.getBody();

    }
}
